<!doctype html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>可乐-Blog 系统管理-用户管理</title>
    <link rel="shortcut icon" type="image/x-icon" th:href="@{/static_resources/favicon.ico}" />
    <link rel="stylesheet" th:href="@{/static_resources/css/nav.css}" type="text/css">
    <link rel="stylesheet" th:href="@{/static_resources/css/leftNav.css}" type="text/css">
    <link rel="stylesheet" th:href="@{/static_resources/css/management.css}" type="text/css">
</head>
<body>

<div class="navHeader">
<!--    <div class="lalala">-->
        <div class="navLeft">
            <div class="logo">
                <img th:src="@{/static_resources/img/KeLe.png}" alt="">
                <div class="KeLeWorld">
                    <img th:src="@{/static_resources/img/KeLeWorld.png}" alt="">
                </div>
            </div>
            <ul class="navUl">
                <li class="navLi">
                    <a class="A" th:href="@{../tooIndex}">首页</a>
                </li>
                <li class="navLi">
                    <a class="A" th:href="@{../blogs/classify}">分类</a>
                </li>
                <li class="navLi border-B">
                    <a class="A">管理系统</a>
                </li>
            </ul>
        </div>
        <div class="navF11">
            <div class="searchContainer">
                <div class="searchInput">全屏</div>
                <div class="glass">
                    <img th:src="@{/static_resources/img/fullScreen.png}" alt="">
                </div>
            </div>
        </div>
        <div class="navMiddle">
            <div class="searchContainer">
                <a th:href="@{/to/toSearch}" class="searchInput">搜索</a>
                <div class="glass">
                    <img th:src="@{/static_resources/img/fangdajing.png}" alt="">
                </div>
            </div>
        </div>
        <div class="navRight">
            <div class="workCenter">
                <a class="A" th:href="@{../to/toWrite}">
                    创作中心
                </a>
            </div>
            <div class="vip">
                <a class="A" th:href="@{../to/toVipCenter}">会员中心</a>
            </div>
            <div class="headerPictureContainer">
                <div class="headerPicture headerPictures">
                    <th:block th:if="${session.User} ne null">
                        <img th:src="@{ ${session.User.src} }" alt="">

                    </th:block>
                </div>
                <div class="message">
                    <h3 class="messageName"></h3><!--后台数据*用户名-->
                    <div class="vipTF">vip</div><!--vip-->
                    <div class="line"></div><!--下划线-->
                    <div class="FanFollowContent">
                        <div>
                            <div class="FanNumber">
                                <th:block th:if="${session.User} ne null">
                                    <b th:text="${session.User.fans}"></b>
                                </th:block>
                            </div>
                            <div>
                                粉丝
                            </div>
                        </div>
                        <div>
                            <div class="FollowNumber">
                                <th:block th:if="${session.User} ne null">
                                    <b th:text="${session.User.follow}"></b>
                                </th:block>
                            </div>
                            <div>
                                关注
                            </div>
                        </div>
                    </div>
                    <div class="personalCenterC">
                        <div class="personalCenter">
                            <a class="peopleCenter" th:href="@{../to/toPeopleCenter}">个人中心</a>
                        </div>
                        <div class="personalCenterIco">
                            <img th:src="@{/static_resources/img/icon7.png}" alt="">
                        </div>
                    </div>
                    <div class="personalCenterO">
                        <div class="personalCenter">
                            <a class="peopleCenter" th:href="@{../blogs/findBlogsByBlogger}">内容管理</a>
                        </div>
                        <div class="personalCenterIco">
                            <img id="OtherPicture" th:src="@{/static_resources/img/neirongguanli.png}" alt="">
                        </div>
                    </div>
                    <div class="personalCenterO">
                        <div class="personalCenter">
                            <a class="peopleCenter" th:href="@{../to/toMyCollect}">我的收藏</a>
                        </div>
                        <div class="personalCenterIco">
                            <img th:src="@{/static_resources/img/collection.png}" alt="">
                        </div>
                    </div>
                    <div class="personalCenterO">
                        <div class="personalCenter">
                            <a class="peopleCenter">退出登录</a>
                        </div>
                        <div class="personalCenterIco">
                            <img th:src="@{/static_resources/img/tuichu.png}" alt="">
                        </div>
                    </div>
                </div>
            </div>
        </div>
<!--    </div>-->
</div>
<!--系统管理/用户管理-->
<div class="managementLeftNavContainer">
    <div>
        <ul class="userManagement">
            <li class="userManagementLi backgroundColor">
                <a class="userManagementA whiteColor publicChecked" href="">
                    用户管理
                </a>
            </li>
        </ul>
        <ul class="articleManagement">
            <li class="userManagementLi">
                <a class="userManagementA blackColor" th:href="@{../blogs/findBlogs}">
                    文章管理
                </a>
            </li>
        </ul>
<!--        <ul class="pictureManagement">-->
<!--            <li class="userManagementLi">-->
<!--                <a class="userManagementA blackColor" th:href="@{../to/toPicture}">-->
<!--                    评论管理-->
<!--                </a>-->
<!--            </li>-->
<!--        </ul>-->
        <ul class="pictureManagement">
            <li class="userManagementLi">
                <a class="userManagementA blackColor" th:href="@{../blogs/findAbBlogs(vip=1)}">
                    审核系统
                </a>
            </li>
        </ul>
<!--        <ul class="pictureManagement">-->
<!--            <li class="userManagementLi">-->
<!--                <a class="userManagementA blackColor">-->
<!--                    操作日志-->
<!--                </a>-->
<!--            </li>-->
<!--        </ul>-->
    </div>
</div>
<div class="managementContainer">
    <div class="management">
        <!--        <div class="userHead">-->
        <h3>
            用户管理
        </h3>
        <div class="selectUser">
            <input type="text" placeholder="请输入要搜索的内容" class="selectInput">
            <a id="selectBtn" th:href="@{../manager/fuzzy}">搜索</a>
        </div>
        <div class="batchDelete">
            批量删除
        </div>
        <div class="resetting">
            重置
        </div>
<!--                </div>-->

    </div>
    <table id="userTable">
        <thead>
        <tr>
            <th style="display: none">选择</th>
            <th style="display: none">id</th>
            <th>账号</th>
            <th>用户昵称</th>
            <th>真实姓名</th>
            <th>性别</th>
            <th style="display: none">年龄</th>
            <th style="display: none">邮箱</th>
            <th style="display: none">出生日期</th>
            <th style="display: none">注册时间</th>
            <th>博客篇数</th>
            <th colspan="3">操作</th>
        </tr>
        </thead>
        <tbody class="tbody">
        <th:block th:with="pageInfos=${pageInfo}">
            <tr th:each="user,list:${pageInfos.list}">
                <td class="td" style="display: none"><input type="checkbox" class="checkBox"/></td>
                <td class="td" th:text="${user.id}" style="display: none"></td>
                <td class="td" th:text="${user.account}"></td>
                <td class="td" th:text="${user.nickname}"></td>
                <td class="td" th:text="${user.realname}"></td>
                <td class="td" th:text="${user.sex}"></td>
                <td class="td" th:text="${user.age}" style="display: none"></td>
                <td class="td" th:text="${user.email}" style="display: none"></td>
                <td class="td" th:text="${user.birthday}" style="display: none"></td>
                <td class="td" th:text="${user.birthday}" style="display: none"></td>
                <td class="td" th:text="${user.blognumber}"></td>
                <td colspan="3">
                    <button class="examine">查看</button>
                    <button class="change">修改</button>
                    <button class="delete">删除</button>
                </td>
                <div class="mask"></div>
                <div class="examinePop">
                    <span class="examineCut">×</span>
                    <h3>查看用户信息</h3>

                    <form th:action="@{/manager/updateUsers(id=${user.id},pageNum=${pageInfo.pageNum})}" id="userForm"  method="post">
                        <div class="popBox">
                            <input type="hidden" name="id" th:value="${user.id}">
                            <div class="popText">
                                <p>账号: </p>
                                <input type="text" class="popInput" name="account" disabled th:value="${user.account}">
                            </div>
                            <div class="popText">
                                <p>用户昵称: </p>
                                <input type="text" class="popInput" name="nickname" disabled th:value="${user.nickname}">
                            </div>
                            <div class="popText">
                                <p>真实姓名: </p>
                                <input type="text" class="popInput" name="realname" disabled th:value="${user.realname}">
                            </div>
                            <div class="popText">
                                <p>性别: </p>
                                <input type="text" class="popInput" name="sex" th:value="${user.sex}" disabled>
                            </div>
                            <div class="popText">
                                <p>年龄: </p>
                                <input type="text" class="popInput" name="age" disabled th:value="${user.age}">
                            </div>
                            <div class="popText">
                                <p>邮箱: </p>
                                <input type="text" class="popInput" name="email" disabled th:value="${user.email}">
                            </div>
                            <div class="popText">
                                <p>出生日期: </p>
                                <input type="text" class="popInput" name="birthday" disabled th:value="${user.birthday}">
                            </div>
                            <div class="popText">
                                <p>博客篇数: </p>
                                <input type="text" class="popInput" name="blognumber" disabled th:value="${user.blognumber}">

                            </div>
                        </div>
                    </form>
                </div>
                <div class="popupWindow">
                    <p class="userNameP">你确定删除<b><span class="userNameS">

                </span></b>吗？</p>
                    <button class="cancel">取消</button>
                    <a class="determine" th:href="@{deleteUser(id=${user.id},pageNum=${pageInfo.pageNum},pageSize=${pageInfo.size})}"  >确定</a>
                </div>

                <div class="pop">
                    <span class="cut">×</span>
                    <h3>修改用户信息</h3>

                    <form th:action="@{/manager/updateUsers(id=${user.id},pageNum=${pageInfo.pageNum})}" id="userForm"  method="post">
                        <div class="popBox">
                            <input type="hidden" name="id" th:value="${user.id}">
                            <div class="popText">
                                <p>账号: </p>
                                <input type="text" class="popInput" name="account" th:value="${user.account}" disabled style="cursor:no-drop;">
                            </div>
                            <div class="popText">
                                <p>用户昵称: </p>
                                <input type="text" class="popInput" name="nickname" th:value="${user.nickname}">
                            </div>
                            <div class="popText">
                                <p>真实姓名: </p>
                                <input type="text" class="popInput" name="realname" th:value="${user.realname}">
                            </div>
                            <div class="popText">
                                <p>性别: </p>
<!--                                <input type="text" class="popInput" name="sex" th:value="${user.sex}">-->
                                <select class="popInput" type="text" name="sex" th:value="${user.sex}">
                                    <option>男</option>
                                    <option>女</option>
                                </select>
                            </div>
                            <div class="popText">
                                <p>年龄: </p>
                                <input type="text" class="popInput" name="age" th:value="${user.age}">
                            </div>
                            <div class="popText">
                                <p>邮箱: </p>
                                <input type="text" class="popInput" name="email" th:value="${user.email}">
                            </div>
                            <div class="popText">
                                <p>出生日期: </p>
                                <input type="date" class="popInput" name="birthday" th:value="${user.birthday}">
                            </div>
                            <div class="popText">
                                <p>博客篇数: </p>
                                <input type="text" class="popInput" name="blognumber" th:value="${user.blognumber}" disabled style="cursor:no-drop;">

                            </div>
                        </div>
                        <div class="changeUserInfoBtn">
                            <button id="userNoBtn">取消</button>
                            <button id="userYesBtn">确定</button>
                        </div>
                    </form>
                </div>
            </tr>
        </th:block>
        </tbody>
    </table>
    <div class="paging" >
        <a th:href="@{'findAllUser?pageNum=1'}"><button class="firstPage changeColor" >首页</button></a>

        <span th:if="${pageInfo.isHaveProPageNum}">
            <a th:href="@{'findAllUser?pageNum='+${pageInfo.proPageNum}}">
                <button class="goPrePage changeColor">上一页</button>
            </a>
        </span>
        <span th:unless="${pageInfo.isHaveProPageNum}">
            <a th:href="@{'findAllUser?pageNum='+${pageInfo.proPageNum}}">
                <button class="goPrePage" disabled style="cursor: no-drop">上一页</button>
            </a>
        </span>


        <span th:each="accs:${pageInfo.pageBar}">

            <span th:if="${pageInfo.pageNum} eq ${accs}">
                <a th:href="@{'findAllUser?pageNum='+${accs}}">
                    <button class="allPages" style="background-color: #00c4ff;color: #FFFFFF" th:text="${accs}" disabled></button>
                </a>
            </span>

            <span th:unless="${accs} eq ${pageInfo.pageNum}">
                <a th:href="@{'findAllUser?pageNum='+${accs}}">
                    <button class="allPages changeColor" th:text="${accs}"></button>
                </a>
            </span>
        </span>

        <span th:if="${pageInfo.isHaveNextPageNum}">
            <a th:href="@{'findAllUser?pageNum='+${pageInfo.nextPageNum} }">
                <button class="goNextPage changeColor" >下一页</button>
            </a>
        </span>
        <span th:unless="${pageInfo.isHaveNextPageNum}">
            <button class="goNextPage" disabled style="cursor: no-drop">下一页</button>
        </span>
        <span>
            <a th:href="@{'findAllUser?pageNum='+${pageInfo.pageNums} }">
                <button class="lastPage changeColor">尾页</button>
            </a>
        </span>
        <span>
            共<button th:text="${pageInfo.pageNums}" class="pageNums"></button>页
        </span>
        <span class="successDelete">完成</span>
    </div>

</div>
<div class="tips"></div>

<script th:src="@{/static_resources/js/jquery-1.12.4.min.js}" type="text/javascript"></script>
<script type="text/javascript"  th:src="@{/static_resources/js/nav.js}"></script>
<script th:src="@{/static_resources/js/leftNav.js}" type="text/javascript"></script>
<script th:src="@{/static_resources/js/management.js}" type="text/javascript"></script>
<script th:src="@{/static_resources/js/otherLogin.js}" type="text/javascript"></script>
</body>
</html>